#! /bin/bash
# 导入函数库文件
. lib.sh
get_system_info
system_arch
status_exit
device_side
while true; do
	f_Menu
	case $option in
		1)
			cycle_1
			if [[ $? -eq 0 ]]; then
				break
			else
				status_exit
			fi
			;;
		2)
			judge_a
			status_exit
			ollama_serve
			if [[ "$?" -eq 0 ]]; then
				ollama_list
			fi
			break
			;;
		3)
			judge_a
			status_exit
			ollama_serve
			judge_8
			if [[ $? -eq 0 ]]; then
				break
			else
				status_exit
			fi
			;;
		4)
			echo "正在退出程序......"
			exit 0
			;;
		*)
			prompt_1
			;;
	esac
done
if ls | grep -q "tmp.txt"; then
	rm tmp.txt
fi
